from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer

annuaire = {"Standard"  : 6500,
            "Bidet"     : 6560,
            "Boimon"    : 6562,
            "Cottenceau": 6563,
            "Declerck"  : 6568,
            "Godon"     : 6570,
            "Hardouin"  : 6564,
            "Ferrier"   : 6574,
            "Lahaie"    : 6565} 

class MyHTTPHandler(BaseHTTPRequestHandler):
	def do_GET(self):
		ch = ""
		for i in annuaire.keys() :
			ch += i + " : " + str(annuaire[i]) + "\n"
		self.wfile.write(ch)

try:
	server = HTTPServer(("localhost",2000),MyHTTPHandler)
	server.serve_forever()
except KeyboardInterrupt:
	print 'Control+c: http serv is getting shutdown'
	server.socket.close()
	
	